package com.laboratory.serviceprovide.workBench.mapper;

import com.Laboratory.utilPojo.projectState;
import com.Laboratory.utilPojo.projectWithState;
import com.Laboratory.utilPojo.projectWithStateAndTime;
import com.Laboratory.utilPojo.projectWithUrl;
import com.Laboratory.workBench.pojo.file;
import com.Laboratory.workBench.pojo.project;
import com.Laboratory.workBench.pojo.teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface projectMapper {
    List<teacher> getTeacherListByApply();
    int insertProjectApply(project project);
    int insertProjectDescription(projectState projectState);
    int saveFileToLocalService(List<file>FileList);
    List<Map<Object,Object>> getTeacherPopularity();
    List<Map<Object,Object>> getCostRankData();
    List<projectWithState> getProjectList();

    List<projectWithStateAndTime> getProjectListByCondition(Map<String,Object> map);
    int getProjectListRowsByCondition(Map<String,Object>map);
    int updateProjectState(projectWithStateAndTime project);
    int createProjectRoomRecord(
            @Param("id") String id,
            @Param("projectId") String projectId,
            @Param("roomId") String roomId);

    List<projectWithUrl> getProjectFileList();
    List<project> selectInvalidProjectApply();
    int deleteProjectStateById(String id);
    int deleteProjectById(String id);
    List<String> getFileNameByProjectId(String id);
    int deleteProjectFileById(String id);
    List<project> selectOverTimeProjectRecord();
    int deleteProjectRoomRelation(String id);
    int deleteTeacherById(String teacherId);
    int createTeacher(teacher teacher);
}